cflags = `sdl-config --cflags` -g
lflags = `sdl-config --libs` -lSDL_gfx -lSDL_ttf
bin = mapeditor
objs = editor.o map.o assist.o

$(bin): $(objs)
	gcc $(lflags) -o $(bin) $(objs)
editor.o: editor.c editor.h assist.h
	gcc $(cflags) -c editor.c
map.o: map.c map.h
	gcc $(cflags) -c map.c
assist.o: assist.c
	gcc $(cflags) -c assist.c

clean:
	-rm *.o $(bin)
